# import sys

import unittest
import openpyxl

# sys.path.append('..')
from base.runcase import RunCase


class TestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        # 实例化用例执行类,参数数用例文件路径
        cls.rCase = RunCase(openpyxl.load_workbook('../data/keywords_data.xlsx'))

    @classmethod
    def tearDownClass(cls):
        # 关闭excel
        cls.rCase.close_excel()
        cls.rCase.close_broswer()

    # def test_01(self):
    #     self.rCase.runcase('Sheet1')
    #     print('test_01 成功执行')

    # def test_02(self):
    #     self.rCase.runcase('Sheet2')
    #     print('test_02 成功执行')

    def test_03(self):
        self.rCase.runcase('Sheet3')
        print('test_03 成功执行')
if __name__ == '__main__':
    unittest.main()
